//Stephen Kirksharian
//Robert Harkreader
//CPSC 321
//DUE 4/27/08

`include "IdealMemory.v"
`include "PC_4.v"
`include "PC.v"
`include "clock.v"

//This program is used for starting the PC
module testPC(sA,Reset);
	input [31:0]sA;
	input Reset;

	wire[31:0]locaddress;
	wire[31:0]outputs;
	wire[31:0]a_in;
	wire clk;
	
	m555 clk1(clk);
	InstrMem(locaddress,outputs);
	PC_4(a_in,locaddress);
	PC(Reset,1'b0,locaddress,clk,a_in);

	always @(negedge clk) begin
	  $display($time," a_in=%d\treset=%d",a_in,Reset);
	  $display("instruction: %b",outputs);
	end
endmodule
	
module test;
	reg[31:0]start;
	reg reset;

	testPC(start,reset);
	initial begin
	  reset=0; start=0;
	  #101 reset=1;
	  #500 $finish;
	end
endmodule